import { useEffect, useState } from "react";
import { useSelector} from 'react-redux'
const Login = ()=>{
    const [num, setNum] = useState(0);
    const list = [1,23,456,789];
    const {userId} = useSelector(state=>state.user);
    const addNum = ()=>{
        setNum(num+1);
    }
    useEffect(()=>{
        console.log(121);
    },[])
    return (
        <div>
            <h2>login{num}</h2>
            <div>{list}</div>
            <div>userID:{userId}</div>
            <button onClick={addNum}>变化</button>
        </div>
    )
}
export default Login;